/*
 * Copyright 2017-2020 Allegro.pl
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../../../imports';

$row-height: 25px;
$measure-width: 80px;
$color-swab-size: 15px;
$color-swab-margin: 5px;

.bar-chart-legend {
  min-height: 94px;

  .legend-header {
    @extend %module;
    @include css-variable(color, text-light);
    margin-bottom: 1px;
    height: 36px;
    padding-left: 14px;
    padding-top: 12px;
    font-size: 12px;
    text-transform: uppercase;
  }

  .legend-values {
    @extend %module;
    margin-bottom: 1px;
    padding: 10px 14px;
  }

  .legend-values-table {
    width: 100%;
    table-layout: fixed;

    .legend-value {
      height: $row-height;

      .legend-value-color-cell {
        width: $color-swab-size + $color-swab-margin;
      }

      .legend-value-color {
        width: $color-swab-size;
        height: $color-swab-size;
        border-radius: 2px;
      }

      .legend-value-label {
        @include ellipsis;
      }

      .legend-value-measure {
        width: $measure-width;
        text-align: right;
      }
    }
  }
}
